﻿<%@ Page Language="C#" %>

<%@ Import Namespace="wojilu" %>
<%@ Import Namespace="wojilu.View" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Domain" %>
<%@ Import Namespace="wojilu.Apps.Qycms.Service" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>#{softtitle}</title>
<link href="#{path.css}ybb/css/baselist.css?v=#{cssVersion}" rel="stylesheet" type="text/css" />
<link href="#{path.css}ybb/css/all.css?v=#{cssVersion}" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="#{path.js}ybb/js/jquery.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/control.js?v=#{jsVersion}"></script>
<script type="text/javascript" src="#{path.js}ybb/js/form.js?v=#{jsVersion}"></script>
<script type="text/javascript" language="JavaScript">
    var forummain_search_js_searchkey_err = "_{forummain_search_js_searchkey_err}";
    var iframename = "#{iframename}";
	$(document).ready(function(){
		var h = $(window).height();
		$('#mainwindowhidden').css({height:h-39});
		var options = {
			beforeSubmit: formverify,
			success:function(){
				return false;
			}
		}
		$('#docsearch').submit(function() {
			$(this).ajaxSubmit(options);
			return false;
		});
	})
	function formverify(formData, jqForm, options) {
		var queryString = $.param(formData);
		var get=urlarray(queryString);
		if(get['searchkey']!=""){
			if(get['searchkey'].match(/[\'\"\<\>\,\;\^\$\(\)\!\.]+/ig)!=null) {
				document.docsearch.searchkey.focus();
				alert(forummain_search_js_searchkey_err);
				return false;
			}
		}
		var esarchurl = "<%=link.to(new wojilu.Web.Controller.Admin.Qycms.BbsController().BbsMainList) %>?lng=" + get['lng'] + "&btid=" + get['btid'] + "&isclass=&blid=&linkebid=&istop=&recommend=&purview=&noreply=&limitkey=&limitclass="
			+"&eqid=1&serchekey="+encodeURI(get['searchkey']);
		parent.frames[iframename].search(esarchurl)
		parent.closeifram();
		return false;
	}
</script>
<!--[if IE 6]>
<style type="text/css" media="screen"> 
body { behavior:url("templates/css/csshover.htc");} 
</style> 
<![endif]-->
</head>

<body class="bodyflow">
<div class="centerrightwindow">
	<form name="docsearch" id="docsearch" method="post" action="#body">
	<div id="mainwindowhidden">
		<div class="suggestion">
			<span class="sugicon"><span class="strong colorgorning2">_{position_title}</span><span class="padding-left5 colorgorningage">_{forummain_search_title}</span></span>
		</div>
		<div class="sugtitle-line"></div>
		<div class="formdiv" id="filecheckmanger">
			<table border="0" width="100%">
				<tr class="trstyle2">
					<td width="20%" class="trtitle01">_{forummain_search_keyword}</td>
					<td width="80%" class="trtitle02"><input type="text" name="searchkey" size="30" maxlength="30" class="infoInput"/></td>
				</tr>
				<tr class="trstyle2">
					<td width="20%" class="trtitle01">_{forummain_add_lng}</td>
					<td width="80%" class="trtitle02">
						<select size="1" name="lng" id="lng" onchange="javascript:selectlinkagelng('btid','index.php?archive=connected&action=bbstypelist&lng='+this.value)">
                        <%var lnglist = v.data("lnglist") as List<Lng>; %>
						<%foreach(var row in lnglist){ %>
							<option value="<%=row.lngtitle %>"><%=row.lngtitle %></option>
						<%} %>
						</select>
					</td>
				</tr>
				<tr class="trstyle2">
					<td width="20%" class="trtitle01">_{forummain_add_type}</td>
					<td width="80%" class="trtitle02">
						<select size="1" name="btid" id="btid">
							<option value="0">_{forummain_add_type_option}</option>
                            <%var bbstype = v.data("bbstype") as List<Bbs_TypeList>; %>
							<%foreach(var row in bbstype){ %>
							<option value="<%=row.Id %>"><%=row.typename %></option>
							<%} %>
						</select>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<div id="downbotton">
		<div id="subbotton">
			<table border="0" width="100%">
				<tr id="bottonsubmit">
					<td id="right"><input type="submit" name="Submit" id="submitbotton" value="_{botton_search}" class="buttonface" title="_{botton_search}"/></td>
					<td id="left" class="padding-left5"><input type="reset" name="reset" onClick="javascript:parent.closeifram();" id="release" value="_{botton_search_reset}" class="buttonface"  title="_{botton_search_reset}" /></td>
				</tr>
			</table>
		</div>
	</div>
	</form>
</div>
</body>
</html>